const data = [
	{ title:'创建模板', name:'create-template', children: [
		{ title:'SearchTable', name:'SearchTable' },
	] },
	{ title:'MySQL', name:'mysql', children:[
		{ title:'sea_orm', name:'sea-orm' },
		{ title:'数据管理', name:'data' },
	]},
	{ title:'MongoDB', name:'mongodb', children:[
		{ title:'gridfs', name:'gridfs' },
	] },
	// { title:'Redis', name:'redis' },
	{ title:'系统管理', name:'system', children: [
		{ title:'menu', name:'menu' },
	] },
]
const childRouter = {
	'table' : [
		{ name:'structure' },
		{ name:'data' }
	],
	'sea-orm': [
		{ name:'structure', component: 'mysql/table/structure' }
	],
	'database': [
		{ name:'table', component: 'mysql/table', child: [
			{ name:'structure', component: 'mysql/table/structure' },
			{ name:'data', component: 'mysql/table/data' }
		] },
		{ name:'migration', component: 'mysql/migration', child:[
			{ name:'data', component: 'mysql/table/data' }
		] }
	],
	'migration': [
		{ name:'data', component: 'mysql/table/data' }
	]
}
const Index = {
	async getMenu( isLogin ){
		return await window.$.getDymaicMenu({
			childRouter,
			isLogin,
			data, 
			api:'menu/list',
		})
	}
}
export default Index